#include "mailbox.h"
#include "byte_buffer.h"
#include <iostream>



as::md::MailBox::MailBox(MailHandle handle)
	:h_(handle)
{
	
}

as::md::MailBox::~MailBox()
{

}

bool as::md::MailBox::Delivery(ByteBufferPtr &buf, MailPos &to)
{
	if (h_)
	{
		h_(buf, to);
		return true;
	}
	else
	{
		std::cout << "mail box delivery empty h_";
	}
	return false;
}

